import java.util.Scanner;

public class Main1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        String str = scanner.nextLine();
        int count = 0;
        StringBuilder stringBuilder = new StringBuilder();
        StringBuilder[] stringBuilders = new StringBuilder[str.length()];
        for (int i = 0; i < str.length(); i++) {
            char ch = str.charAt(i);
            if (ch == '"') {
                i++;
                ch = str.charAt(i);
                while (ch != '"') {
                    stringBuilder.append(ch);
                    i++;
                    ch = str.charAt(i);
                }
            } else {
                if (ch == ' ') {
                    stringBuilders[count] = stringBuilder;
                    stringBuilder = new StringBuilder();
                    count++;
                } else {
                    stringBuilder.append(ch);
                }
            }

        }
        System.out.println(count + 1);
        for (int i = 0; i < count; i++) {
            System.out.println(stringBuilders[i]);
        }
        System.out.println(stringBuilder);
    }
}
